<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><?php echo config('shopName');?> - 文章列表 </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="<?=ADMIN_CSS;?>/general.css" rel="stylesheet" type="text/css" />
    <link href="<?=ADMIN_CSS;?>/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>
    <span class="action-span"><a href="<?php echo url("Admin/Article/add")?>">添加文章</a></span>
    <span class="action-span1"><a href="<?php echo url("Admin/Index/main")?>"><?php echo config('shopName');?></a></span>
    <span id="search_id" class="action-span1"> -文章列表 </span>
    <div style="clear:both"></div>
</h1>
<div class="form-div">
    <form action="<?php echo url('Admin/Article/lst');?>" name="searchForm" method="get">
        <img src="<?=ADMIN_IMG;?>/icon_search.gif" width="26" height="22" border="0" alt="search" />
        <input type="text" name="keyword" size="50" placeholder="标题" value="<?php echo $keyword?>" autocomplete="off" />
        <input type="submit" value=" 搜索 " class="button" />
    </form>
</div>
<form method="post" action="" name="listForm">
    <div class="list-div" id="listDiv">
        <table cellpadding="3" cellspacing="1">
            <tr>
                <th>编号</th>
                <th>文章标题</th>
                <th>文章分类</th>
                <th>文章重要性</th>
                <th>是否显示</th>
                <th>添加日期</th>
                <th>操作</th>
            </tr>
            <?php foreach ($article_data as $k=>$v):?>
            <tr>
                <td>
                    <?php echo $v["article_id"]?>
                </td>
                <td align="center">
                    <a href="<?php echo url("Home/Help/lst",array('id'=>$v['article_id']))?>" target="_blank"  title="查看"><?php echo $v["title"]?></a>
                </td>
                <td align="center"> <?php echo $cat_name[$v["cat_id"]]?></td>
                <td align="center">
                    <?php if($v["article_type"] == 1):?>
                       置顶
                    <?php elseif($v["article_type"] == 0):?>
                       普通
                    <?php endif;?>
                </td>
                <td align="center">
                    <?php if($v["is_open"] == 1):?>
                    <img src="<?=ADMIN_IMG;?>/yes.gif">
                    <?php elseif($v["is_open"] == 0):?>
                     <img src="<?=ADMIN_IMG;?>/no.gif">
                    <?php endif;?>
                </td>
                <td align="center"><?php echo date("Y-m-d H:i:s",$v["add_time"])?></td>
                <td align="center">
                    <a href="<?php echo url("Home/Help/lst",array('id'=>$v['article_id']))?>" target="_blank"  title="查看">查看</a> |
                    <a href="<?php echo url("Admin/Article/save",array('article_id'=>$v['article_id']))?>" title="编辑">编辑</a> |
                    <a onclick="return confirm('确定要删除吗');" href="<?php echo url("Admin/Article/delete",array('article_id'=>$v['article_id']))?>" title="删除">移除</a>
                </td>
            </tr>
            <?php endforeach;?>
            <tr>
                <td align="center" nowrap="true" colspan="7">
                    <?php echo $page;?>
                </td>
            </tr>
        </table>
    </div>
</form>

<?php require_once  resource_path('view/public/footer.php');?>
</body>
</html>